<template>
    <h1>{{ msg }}</h1>
    <h1>{{ school }}</h1>
    <button @click="test">nanananann</button>
    <slot name="qwe"></slot>
</template>

<script>
export default {
    name: "Demo",
    props: ["msg", "school"],
    emits: ["hello"],
    setup(props, context) {
        console.log("--props--", props);
        console.log("--context--", context.slots);
        let test = function () {
            context.emit("hello", 777);
        };
        return { test };
    },
};
</script>

<style scoped>
</style>